import request from '@/utils/request'

//获取工位信息
export function getExamStationInfo(examId) {
  return request({
    url: '/coffee/student/examStationInfo?examId='+examId,
    method: 'get',
  })
}
//获取考卷信息
export function queryExam() {
    return request({
        url: '/coffee/student/exam',
        method: 'get',
    })
}

//获取考卷信息
export function getPaper(paperId) {
    return request({
        url: '/coffee/student/paper?paperId='+paperId,
        method: 'get',
    })
}

//提交回答
export function submitAns(qid,isAuto,qAns,paperId) {
  return request({
    url: '/coffee/student/submit',
    method: 'post',
    data: [{
      "id": qid,
      "isAuto": isAuto,
      "answer": qAns,
      "paperId": paperId
    }]
  })
}

//最终提交回答
export function submitAnsFinal(qid,isAuto,qAns,paperId) {
  return request({
    url: '/coffee/student/submit',
    method: 'post',
    data: [{
      "id": qid,
      "isAuto": isAuto,
      "answer": qAns,
      "paperId": paperId,
      "status" : 1
    }]
  })
}
